package com.xyw.code.taobaokeapi.rest;

import com.xyw.code.common.core.entity.vo.Result;
import com.xyw.code.taobaokeapi.service.TbkService;
import com.xyw.common.taobaokecommon.vo.CommissionInfoVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;


/**
 * Created with IntelliJ IDEA.
 * User: xuyiwei
 * Date: 2020/8/6
 * Time: 上午8:38
 * Email: 1328312923@qq.com
 * Description: No Description
 **/
@Api(value="淘宝客")
@RestController
@RequestMapping("/tbk")
public class TbkController {
    @Autowired
    private TbkService tbkService;

    @ApiOperation(value = "getCommissionInfo",notes = "根据淘口令获取信息")
    @PostMapping("/getCommissionInfo")
    public Result<CommissionInfoVO> getCommissionInfo(@RequestParam("tkl") String tkl){
        CommissionInfoVO commissionInfoVO = tbkService.getCommissionInfo(tkl);
        return Result.success(commissionInfoVO);
    }
}
